<?php
$parentCaption = BUtils::T('profile_lbl');
$caption = BUtils::T('preview_btn');
$this->pageTitle = $caption;

$this->breadcrumbs = array(
	$parentCaption => array('index'),
	$caption,
);

//define array
$aWeekDays = BUtils::WeekDayKeys(7, true);
$a24Hours = BUtils::AllHour24();
$hours_list = MerchantObject::HtmlBusinessHours($aHours, $aWeekDays, $a24Hours);

//get url_logo
$url_logo = BUtils::GetPictureUrl($model->url_logo);
?>
<div class="page-header position-relative">
	<h1>
		<?php echo $parentCaption; ?>
		<small>
			<i class="icon-double-angle-right"></i>
			<?php echo $caption; ?>
		</small>
	</h1>
</div><!--/.page-header-->

<div class="row-fluid">
	<!-- Message -->
	<div class="alert alert-block alert-success">
		<button type="button" class="close" data-dismiss="alert">
			<i class="icon-remove"></i>
		</button>
		<i class="icon-info-sign green"></i>
		<?php echo BUtils::T('how_profile_works_eg'); ?>
		<a href="http://yamii.fi/place/<?php echo Yii::app()->user->id; ?>?ref=yfb" target="_blank"><?php echo BUtils::T('how_profile_looks_lbl'); ?></a>.
	</div>
	
	<div class="space-6"></div>
	
	<div class="row-fluid">
		<div class="span7">
			<div class="widget-box transparent">
				<div class="widget-header">
					<h3 class="lighter blue"><?php echo $model->name; ?></h3>
					<div class="widget-toolbar">
						<a href="<?php echo Yii::app()->createUrl('/profile/form'); ?>">
							<i class="icon-edit red"></i>
						</a>
					</div>
				</div>
				<div class="widget-body">
					<div class="widget-body-inner">
					<div class="widget-main">
						<div class="business-profile-info">
							<div class="business-logo pull-right">
								<img src="<?php echo $url_logo; ?>" alt="" class="img-polaroid" />
							</div>
							<div class="business-ul" style="overflow:hidden;">
								<ul class="unstyled the-icons">
									<li><i class="icon-map-marker"></i> <span class="street"><?php echo $model->address; ?></span></li>
									<li><i class="icon-map-marker white"></i> <span class="city"><?php echo $model->postcode . ' ' . $model->city; ?></span></li>
								</ul>
								<ul class="unstyled the-icons">
									<li><i class="icon-phone"></i> <span class="phone"><?php echo $model->phone; ?></span></li>
								</ul>
								<?php echo $hours_list; ?>
								<ul class="unstyled the-icons">
									<li><i class="icon-external-link"></i> <a href="<?php echo $model->url_site; ?>" target="_blank"><?php echo $model->url_site; ?></a></li>
									<li><i class="icon-facebook-sign"></i> <a href="<?php echo $model->url_facebook_page; ?>" target="_blank"><?php echo $model->url_facebook_page; ?></a></li>
								</ul>
							</div>
						</div>
					</div>
					</div>
				</div>
			</div>
			
			<div class="space-6"></div>
			
			<div class="widget-box transparent">
				<div class="widget-header">
					<h3 class="lighter blue"><?php echo BUtils::T('brief_lbl'); ?></h3>
				</div>
				<div class="widget-body">
					<div class="widget-body-inner">
					<div class="widget-main">
						<?php echo $model->brief; ?>
					</div>
					</div>
				</div>
			</div>
		</div>
		<div class="span5">
			<div class="widget-box transparent">
				<div class="widget-header">
					<h3 class="lighter blue"><?php echo BUtils::T('detail_features_lbl'); ?></h3>
					<div class="widget-toolbar">
						<a href="<?php echo Yii::app()->createUrl('/profile/feature'); ?>">
							<i class="icon-edit red"></i>
						</a>
					</div>
				</div>
				<div class="widget-body">
					<div class="widget-body-inner">
					<div class="widget-main" style="font-size:1.1em;">
<?php
echo MerchantObject::HtmlDetailFeatures($tag);
?>
					</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>